package ModelLayer;
/**
 * 
 * @author Gruppe 2
 *
 */
public class SalesLine {

	private int id;
	private SalesOrder salesOrder;
	private int quantity;
	
	private Product p;
	
	/**
	 * 
	 * @param id
	 * @param salesOrder
	 * @param p
	 * @param quantity
	 */
	public SalesLine(int id, SalesOrder salesOrder, Product p, int quantity) {
		this.id = id;
		this.salesOrder = salesOrder;
		this.p = p;
		this.quantity = quantity;
	}
	
	/**
	 * 
	 * @param p
	 * @param quantity
	 */
	public SalesLine(Product p, int quantity) {
		this.p = p;
		this.quantity = quantity;
	}
	
	public SalesLine() {
		id = 0;
		salesOrder = null;
		p = null;
		quantity = 0;
	}

	/**
	 * 
	 * @return id
	 */
	public int getId() {
		return id;
	}

	/**
	 * 
	 * @param id
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * 
	 * @return salesOrder
	 */
	public SalesOrder getSalesOrder() {
		return salesOrder;
	}

	/**
	 * 
	 * @param salesOrder
	 */
	public void setSalesOrder(SalesOrder salesOrder) {
		this.salesOrder = salesOrder;
	}

	/**
	 * 
	 * @return p
	 */
	public Product getProduct() {
		return p;
	}

	/**
	 * 
	 * @param p
	 */
	public void setProduct(Product p) {
		this.p = p;
	}

	/**
	 * 
	 * @return quantity
	 */
	public int getQuantity() {
		return quantity;
	}

	/**
	 * 
	 * @param quantity
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	
}
